Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor NGINX Client to use options #153

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Refactor NGINX Client to use options #153

merged 1 commit into from
Sep 19, 2023

Conversation

lucacome
Copy link
Member

Proposed changes

This change makes creating a client more flexible:

  • passing an HTTP Client is now optional (a default one will be used otherwise)
  • passing the API version is now optional (the latest is used by default)
  • connecting to the API endpoint on creation is controlled by a parameter (disabled by default)

Note: This is a breaking change

@lucacome lucacome self-assigned this Aug 16, 2023
@lucacome lucacome requested a review from a team as a code owner August 16, 2023 22:23
@github-actions github-actions bot added change Pull requests that introduce a change tests Pull requests that update tests labels Aug 16, 2023
@lucacome lucacome changed the title Refactor NGIXN Client to use options Refactor NGINX Client to use options Aug 16, 2023
Copy link

@shaun-nx shaun-nx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of functional options. Nice work! 👏

tests/client_test.go Outdated Show resolved Hide resolved
@lucacome lucacome merged commit 5569e94 into main Sep 19, 2023
12 checks passed
@lucacome lucacome deleted the change/options branch September 19, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Pull requests that introduce a change tests Pull requests that update tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants